package com.wc.service.impl;

import com.wc.dao.BookDao;
import com.wc.dao.impl.BookDaoImpl;
import com.wc.domain.Book;
import com.wc.service.BookService;

import java.io.IOException;
import java.util.List;

public class BookServiceImpl implements BookService {
    private BookDao bookDao = new BookDaoImpl();

    @Override
    public List<Book> getAllBooks() {
        List<Book> res =  bookDao.selectAllBook();
        return res;
    }

    @Override
    public List<Book> getBookByCondition(String type, String qurey) throws IOException {
       List<Book> res=bookDao.selectBookByCondition(type ,qurey);

        return res;
    }
}
